<div class="col-lg-12">
    <!--当前位置 start-->
    <div class="row">
        <div class="col-lg-12">
            <ol class="breadcrumb">
                <li><i class="fa fa-home mrg-r-sm"></i>首页
                <li class="active"><span>老人档案查询</span></li>
            </ol>
        </div>
    </div>
    <!--当前位置 end-->

    <!--代码写在这里-->
    <div class="row">
        <div class="col-lg-12">
            <header class="main-box-header clearfix">
                <div class="filter-block pull-left">
                    <!--搜索框 Start-->
                    <div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.card_number" placeholder="请输入八位数的会员卡号">
                    </div>
                    <div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.eldername" placeholder="请输入老人姓名">
                    </div>
                    <div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.phone" placeholder="请输入联系电话">
                    </div>
                    <!--<div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.em_name"  placeholder="请输入紧急联系人">
                    </div>-->
                    <!--<div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.em_phone" placeholder="请输入紧急联系电话">
                    </div>-->
                    <div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.jiedao_title" placeholder="请输入街道">
                    </div>
                    <div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.cardid"  placeholder="请输入身份证号">
                    </div>
                    <!--<div class="form-group pull-left">
                        <input type="text" class="form-control" ng-model="search.fund" placeholder="请输入余额">
                    </div>-->
                    <a class="btn btn-success pull-left" ng-click="searchArchives()">
                        <i class="fa fa-search search-icon"></i> 搜索
                    </a>
                    <!--搜索框 End-->
                    <!--<a class="btn btn-primary pull-left" href="#/archives/edit/0">-->
                        <!--<i class="fa fa-plus-circle fa-lg"></i> 添加-->
                    <!--</a>-->

                    <!--<div class="pull-left">-->
                        <!--<a class="btn btn-primary pull-left mrg-b-lg md-trigger" id="show">-->
                            <!--<i class="fa fa-plus-circle fa-lg"></i> 批量导入-->
                        <!--</a>-->
                    <!--</div>-->
                </div>
                <!--<div id="range-ul" class="filter-block pull-left col-lg-12" style="display: none;">-->
                    <!--<div class="col-lg-6">-->
                        <!--<form action="" enctype="multipart/form-data" method="post">-->
                            <!--上传文件：-->
                            <!--<div class="form-group pull-left">-->
                                <!--<input type="file" id='upfile' name="upfile"/>-->
                            <!--</div>-->
                            <!--<input id="uploadbutton" type="button" value="上传"/>-->
                        <!--</form>-->
                    <!--</div>-->
                    <!--文件路径：-->
                    <!--<div class="form-group pull-left">-->
                        <!--<input type="text" value="" id="filepath">-->
                    <!--</div>-->
                    <!--<a class="btn btn-success" ng-click="import()">导入</a>-->
                <!--</div>-->
            </header>
            <div class="main-box no-header clearfix">
                <div class="main-box-body clearfix">
                    <div class="table-responsive">
                        <table class="table table-hover table-striped text-center">
                            <thead>
                            <tr>
                                <th class="text-center"><span>街道</span></th>
                                <th class="text-center"><span>社区</span></th>
                                <th class="text-center"><span>姓名</span></th>
                                <th class="text-center"><span>性别</span></th>
                                <th class="text-center"><span>年龄</span></th>
                                <th class="text-center"><span>会员卡号</span></th>
                                <th class="text-center"><span>联系电话</span></th>
                                <th class="text-center"><span>操作</span></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr role="row" class="odd" ng-repeat="item in list">
                                <td class="sorting_1">{{item.jiedao_title || item.jiedao}}</td>
                                <td>{{item.shequ_title || item.shequ}}</td>
                                <td>{{item.name}}</td>
                                <td>{{item.sex}}</td>
                                <td>{{currentYear - (item.birthday | date:"yyyy")}}</td>
                                <td>{{item.card_number}}</td>
                                <td>{{item.phone[0]}}</td>
                                <td style="width: 20%;">
                                    <a class="table-link" href="#/callCenter/elderQueryResult/{{item.code}}">
												<span class="fa-stack">
												<i class="fa fa-square fa-stack-2x"></i>
												<i class="fa fa-file-text fa-stack-1x fa-inverse" title="查看详情"></i>
												</span>
                                    </a>
                                    <!--<a ng-click="delete(item)" class="table-link danger">-->
												<!--<span class="fa-stack">-->
												<!--<i class="fa fa-square fa-stack-2x"></i>-->
												<!--<i class="fa fa-trash-o fa-stack-1x fa-inverse"></i>-->
												<!--</span>-->
                                    <!--</a>-->
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <ul class="pagination pull-right">
                        <li><a >总条数：{{count}}</a></li>
                        <li><a >总页数：{{totalPage}}</a></li>
                        <li><a ng-click="changePage(1)">首页</a></li>
                        <li><a ng-show="currentPage>1" ng-click="changePage(currentPage-1)"><i
                                class="fa fa-chevron-left"></i></a></li>
                        <!--<li><span ng-show="frontdotShow">…</span></li>-->
                        <li ng-repeat="item in pageList" ng-click="changePage(item.number)" class="{{item.active}}"><a>{{item.number}}</a>
                        </li>
                        <!--<li><span ng-show="backdotShow">…</span></li>-->
                        <li><a ng-show="currentPage<totalPage" ng-click="changePage(currentPage+1)"><i
                                class="fa fa-chevron-right"></i></a></li>
                        <li><a ng-click="changePage(totalPage)">尾页</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!--代码写在这里  end-->
</div>
<script>
    $("#uploadbutton").click(function () {
        var filename = $("#upfile").val();
        var formData = new FormData($('form')[1]);
        var app_id = '87aec4dd0f36a288b5ed6550fe947ab7341e9c27';
        var secret = '51f15fefb9b12f1b3225cf491748a45d';
        $.ajax({
            type: "POST",
            url: WEB_URL + "/archives/archives/uploadFile?app_id=87aec4dd0f36a288b5ed6550fe947ab7341e9c27&app_secret=51f15fefb9b12f1b3225cf491748a45d",
            enctype: 'multipart/form-data',
            data: formData,
            processData: false,
            contentType: false,
            dataType: 'json',
            success: function (json) {
                if (json.status) {
                    $('#filepath').val(json.path);
                    alert(json.description);
                }
                else {
                    alert(json.description);
                }
            }

        });
    });
    $(document).ready(function () {
        $("#show").click(function () {
            $("#range-ul").toggle();
        });
    });
</script>